/* eslint-disable react-hooks/exhaustive-deps */
import React, {useEffect, useState} from 'react';
import Link from 'next/link';
import useeffect1 from '../lib/effect'

function Fnconp(props) {
  const [count,
    setCount] = useState(0);
  const [name,
    setName] = useState('zhangsan')
  useeffect1()
  useEffect(() => {
    document.title = `You clicked ${count} times`
  })
  return (
    <div>
      <Link href='/myimage'>image</Link>
      <p>count: {count}
        || name: {name}</p>
      <button
        onClick={() => {
        setCount(count + 1);
        setName('lisi')
      }}>add</button>
    </div>
  )
}

export default Fnconp